<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>15.盒子模型扩展</title>
    </head>
    <style>
        /*左右自适应,产生居中效果*/
        /* #box{width: 400px;height: 100px;background-color: red;
        /* margin-left: auto; margin-right: auto; 
        margin: 0 auto;
        } */
        #box1{width:300px;height:300px;background:red;
        }
         #box2{height:100px;background:blue;
         color: white;
         padding-left: 30px;
         border-left: 10px black solid;
        }
    </style>
    <body>
        <!-- <div id="box"></div> -->
        <div id="box1">
            <div id="box2">这是一些内容</div>
        </div>
    </body>
</html>